<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/main.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}luos/css/style.min.css?v=4.1.0" rel="stylesheet"><link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
	{template admin/top.html}
<script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
<script type="text/javascript" src="{ADMIN_THEME}js/dialog.js"></script>
<title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		{$join_info}<span>|</span>
	</div>
	<div class="bk10"></div>
	<!--<div class="explain-col">
		<form action="" method="post">
		<input name="form" type="hidden" value="search" />
		userid：
		<input type="text" class="input-text" size="5" name="userid" />
		{lang('a-con-63')}：
		<select id="stype" name="stype">
			<option value="0"> &#45;&#45;&#45;&#45; </option>

			{loop $data $t}
			<option value="{$t['field']}">{$t['id']}</option>
			{/loop}
		</select>
		&nbsp;&nbsp;
		<input type="text" class="input-text" size="25" name="kw" />
		<input type="submit" class="btn btn-success btn-sm" value="{lang('a-search')}" name="submit" />
		</form>
	</div>-->
	<div class="bk10"></div>
	<div class="table-responsive mytable">
		<div class="table-responsive mytable">
			<form action="" method="post" name="myform">
				<input name="form" id="list_form" type="hidden" value="order">
				<table width="100%" class="table table-striped">
					<thead>
					<tr>
						<th style="width:40px;" align="left">ID </th>
						<th style="width:90px;" align="left">UID</th>
						<th style="width:90px;" align="left">账号</th>
						<th style="width:90px;" align="left">金额</th>
						<th style="width:90px;" align="left">状态</th>
						<th style="width:90px;" align="left">时间</th>
						<th style="width:90px;" align="left">操作</th>
					</tr>
					</thead>
					<tbody>
					{loop $data $t}
						<tr>
							<td align="left">{$t['id']}</td>
							<td align="left">{$t['uid']}</td>
							<td align="left">{$t['account']}</td>
							<td align="left">{$t['cash']}</td>
							<td align="left">
								{if $t['status']==1}
									未处理
								{else if $t['status']==2}
									成功
								{else}
									驳回
								}
								{/if}
							</td>
							<td align="left">{date('Y-m-d H:i:s',$t['inputtime'])}</td>
							<td align="left">
								{if $t['status']==1}
									<a href="javascript:void(0)" id="confirm" value="{$t['id']}">确认</a> |
									<a href="javascript:void(0)" id="refuse" value="{$t['id']}">驳回</a>
								{/if}
							</td>
						</tr>
					{/loop}
					</tbody>
				</table>
			</form>
			{$pagelist}
		</div>

	</div>
</div>
<script type="text/javascript">
$(function(){
	//确认
	$('#confirm').click(function(){
		var value = $(this).attr('value');
		//利用对话框返回的值 （true 或者 false）
		if (confirm("该操作不可逆，请确认！")) {
			$.ajax({
				url:"{url('admin/finance/operateWithdraw')}",
				type:'post',
				dataType:'json',
				data:{"id":value,"operate":"confirm"},
				success:function(data){
					if(data.code == 0){
						alert('操作成功');
						location.reload();
					}else{
						alert(data.msg);
					}
				}
			});
		}else {
			return false;
		}
	});

	//确认
	$('#refuse').click(function(){
		var value = $(this).attr('value');
		//利用对话框返回的值 （true 或者 false）
		if (confirm("该操作不可逆，请确认！")) {
			$.ajax({
				url:"{url('admin/finance/operateWithdraw')}",
				type:'post',
				dataType:'json',
				data:{"id":value,"operate":"refuse"},
				success:function(result){
					if(data.code == 0){
						alert('操作成功');
						location.reload();
					}else{
						alert(data.msg);
					}
				}
			});
		}else {
			return false;
		}
	});

	var btnFn = function(aaa){
//		$value = $(this).parent('a');
		alert(aaa);
		$.ajax({
			url:"/finance/confirmWithdraw",
			type:'post',
			dataType:'json',
			data:{"id":"11"},
			success:function(result){
				$("#div1").html(result);
			}
		});
	};


});
</script>
</body>
</html>